package com.annotition;

/**
 * Created with IntelliJ IDEA.
 * User: 5
 * Date: 17-3-22
 * Time: 上午9:41
 * To change this template use File | Settings | File Templates.
 */
public class Apple implements Friut{

    @FruitName("红苹果")
    private String name;

    @FruiteColor(FruiteColor.Color.GREEN)
    private String color;


    @Override
    public String toString() {
        return "苹果："+this.getColor()+" "+this.getName();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public void eat() {
        System.out.println("吃苹果！");
    }
}
